package com.create.myworld.factory;

import com.create.myworld.enums.Sex;
import com.create.myworld.living.people.AncestorPeople;
import com.create.myworld.values.Surname;
import com.create.myworld.worldthings.WorldThings;

/**
 * @author zcw
 * 人类工厂
 */
public class PeopleFactory extends WorldFactory {

    public PeopleFactory() {
        name = "人类工厂";
        setNext(new WorkFactory());
    }

    @Override
    protected void produce() {
        String[] yaDangName = Surname.getMaleName(null, Sex.Male);
        String[] xiaWaName = Surname.getMaleName(null, Sex.Female);
        AncestorPeople yaDang = new AncestorPeople(AncestorPeople.class, Sex.Male, yaDangName[0], yaDangName[1], 100L);
        AncestorPeople xiaWa = new AncestorPeople(AncestorPeople.class, Sex.Female, xiaWaName[0], xiaWaName[1], 100L);
        WorldThings.insertLiving(xiaWa,yaDang);
    }
}
